package org.focusj.scala.apps

object TrafficLight extends Enumeration {
    type TrafficLights = Value
    val red, green, yello = Value

    def doWhat(color: TrafficLights) = {
        //        if (color == red) "stop"
        //        else if (color == green) "pass"
        //        else "wait"
        color match {
            case red => "stop"
            case green => "pass"
            case yello => "wait"
        }
    }
}
